<ul class="nav">
	<?php
	$this->db->select('*');
	$this->db->from('pnc_menu');
	$this->db->where('menu_status', 1);
	$nav = $this->db->get();
	$active = $this->uri->segment(1);
	if ($nav->num_rows() > 0) {
		foreach ($nav->result() as $menu) {
			if ($menu->menu_alias === $active OR $active === 'admin') {
				?>
				<li class="active"><?php echo anchor($menu->menu_alias, ucfirst($menu->menu_name), array('title'=>ucfirst($menu->menu_name))); ?></li>
				<?php } else { ?>
				<li><?php echo anchor($menu->menu_alias, ucfirst($menu->menu_name), array('title'=>ucfirst($menu->menu_name))); ?></li>
				<?php
			}
		}
	}
	?>
</ul>